<?php include_once './header.php'; ?>

<?php 

include('config.php'); 
echo "<table border=1 >"; 
echo "<tr>"; 
echo "<td><b>IdContacto</b></td>"; 
echo "<td><b>NombreContacto</b></td>"; 
echo "<td><b>ApellidoContacto</b></td>"; 
echo "<td><b>EmailContacto</b></td>"; 
echo "<td><b>TelefonoContacto</b></td>"; 
echo "<td><b>PaisContacto</b></td>"; 
echo "</tr>"; 
$result = mysql_query("SELECT * FROM `contacto`") or trigger_error(mysql_error()); 
while($row = mysql_fetch_array($result)){ 
foreach($row AS $key => $value) { $row[$key] = stripslashes($value); } 
echo "<tr>";  
echo "<td valign='top'>" . nl2br( $row['idContacto']) . "</td>";  
echo "<td valign='top'>" . nl2br( $row['nombreContacto']) . "</td>";  
echo "<td valign='top'>" . nl2br( $row['apellidoContacto']) . "</td>";  
echo "<td valign='top'>" . nl2br( $row['emailContacto']) . "</td>";  
echo "<td valign='top'>" . nl2br( $row['telefonoContacto']) . "</td>";  
echo "<td valign='top'>" . nl2br( $row['paisContacto']) . "</td>";  
echo "<td valign='top'><a href=editCli.php?idContacto={$row['idContacto']}>Edit</a></td><td><a href=deleteCli.php?idContacto={$row['idContacto']}>Delete</a></td> "; 
echo "</tr>"; 
} 
echo "</table>"; 
echo "<a href=newCli.php>New Row</a>"; 
?>

<?php include_once './footer.php'; ?>